<template>
  <!-- 大客户项目报备管理  -审批明细-->
  <div class="wrapper">
    <Anchor :labelList="labels" activeId="row-01" labelWidth="130">
      <div class="line" id="row-01">
        <SellInfo v-model="value" :infoBasic="infoType" />
      </div>
      <div class="line" id="row-02">
        <BuyInfo v-model="value" :infoBasic="infoType" />
      </div>
      <div class="line" id="row-03">
        <ContractInfo v-model="value" :infoBasic="infoType" />
      </div>
      <div class="line" id="row-04">
        <ImageInfo v-model="value" :infoBasic="infoType" />
      </div>
      <div class="line" id="row-05">
        <CarInfo v-model="value" :infoBasic="infoType" />
      </div>
    </Anchor>
    <div class="dialogBottmView">
      <el-button @click="closeDialog">取 消</el-button>
      <el-button @click="saveDialog" type="primary">审批驳回</el-button>
      <el-button @click="saveDialog" type="primary">审批通过</el-button>
    </div>
  </div>
</template>

<script>
import { getDealerCompanyByCode } from '@/api/common/org/dealerCompany';
import { authority } from '@/utils/authMixin';
import { dictionary } from '@/utils/dictMixin';
import SellInfo from './infoSell'; //基本信息
import BuyInfo from './infoBuy'; //战败信息
import ContractInfo from './infoContract'; //合同信息
import ImageInfo from './infoImage'; //附件信息
import CarInfo from './infoCar'; //车辆信息

export default {
  name: 'DealerCompany',
  mixins: [authority, dictionary],
  components: {
    SellInfo,
    ContractInfo,
    BuyInfo,
    CarInfo,
    ImageInfo
  },
  props: {
    value: {
      type: Number,
      required: true
    },
    infoType: {
      type: String,
      required: true
    }
  },
  data() {
    return {
      labels: [
        { title: '出卖人信息', id: 'row-01' },
        { title: '买受人信息', id: 'row-02' },
        { title: '合同信息', id: 'row-03' },
        { title: '附件信息', id: 'row-04' },
        { title: '车辆信息', id: 'row-05' }
      ],
      formData: {}
    };
  },
  methods: {
    //保存
    saveDialog() {
      this.$emit('close', { visible: false });
    },
    //取消操作
    closeDialog() {
      this.$emit('close', { visible: false });
    }
  }
};
</script>

<style scoped>
.wrapper {
  height: calc(100vh - 110px);
}
</style>
